package com.tripwego.client.ui.footer;

import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.HasVerticalAlignment;
import com.google.gwt.user.client.ui.HorizontalPanel;

public class FooterWidget extends HorizontalPanel {

	private FooterLeftWidget topBarWidgetLeft;

	private FooterCenterWidget topBarCenterWidget;

	private FooterRightWidget topBarWidgetRight;

	public FooterWidget() {
		setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
		setSize("100%", "30px");

		topBarWidgetLeft = new FooterLeftWidget();
		topBarWidgetLeft.setSpacing(0);
		topBarWidgetLeft.setWidth("");

		topBarCenterWidget = new FooterCenterWidget();
		topBarCenterWidget.setSpacing(0);
		topBarCenterWidget.setWidth("");

		topBarWidgetRight = new FooterRightWidget();
		topBarWidgetRight.setSpacing(0);
		topBarWidgetRight.setWidth("");

		add(topBarWidgetLeft);
		setCellWidth(topBarWidgetLeft, "30%");
		add(topBarCenterWidget);
		setCellHorizontalAlignment(topBarCenterWidget,
				HasHorizontalAlignment.ALIGN_CENTER);
		add(topBarWidgetRight);
		setCellWidth(topBarWidgetRight, "30%");
		setCellHorizontalAlignment(topBarWidgetRight,
				HasHorizontalAlignment.ALIGN_RIGHT);
	}
}
